Ventilator patient synchronization

ABSTRACT

A method and apparatus that provides an expert system for determining respiratory phase during ventilatory support of a subject. Discrete phase states are partitioned and prior probability functions and observed probability functions for each state are defined. The probability functions are based upon relative duration of each state as well as the flow characteristics of each state. These functions are combined to determine phase probabilities for each state using Bayes&#39; theorem. The calculated probabilities for the states may then be compared to determine which state the subject is experiencing. A ventilator may then conform respiratory support in accordance with the most probable phase. To provide a learning feature, the probability functions may be adjusted during use to provide a more subject specific response that accounts for changing respiratory characteristics.

This application claims the priority filing date of U.S. provisionalpatent application Ser. No. 60/292,983 filed on May 23, 2001.

FIELD OF THE INVENTION

This invention relates to methods for synchronizing ventilators withpatient respiration. More specifically it relates to methods forestimating the phase in patient respiration using patient flowmeasurements so that the respiratory support of a ventilator can matchthe phase of the respiratory cycle of the patient.

BACKGROUND OF THE INVENTION

Mechanical ventilators assisting spontaneously breathing patients striveto synchronize their performance with the patient's efforts. To do this,ventilators typically measure one or more of pressure, volume, flow andtime and compare that measure with predetermined thresholds. Someventilators use respiratory bands around the chest and abdomen of thepatient to detect patient effort. The ventilator may then adjust thepressure, volume or flow of air being delivered to the patient inaccordance with measure of the patient's efforts. For example, aflow-triggered pressure controlled device may deliver air at one fixedpressure to a patient until the flow crosses a threshold level,whereupon the pressure is changed to another fixed pressure. Dependingon their conditions, different patients may experience different levelsof discomfort depending upon how quickly and accurately the ventilatortracks the patients' efforts. Simple threshold tests may fail whenbreaths are irregular, for example, during the presence of coughs, sighsand snores. An improved method and apparatus for ventilator patientsynchronization is described in Patent Cooperation Treaty ApplicationPCT/AU97/00631 with publication number WO 98/12965 (Berthon-Jones) wherethe phase of the patient's respiratory cycle is determined from flowdata using fuzzy logic. The specification is hereby included bycross-reference.

Typical apparatus includes a servo 3 controlled blower, comprised of amotor 2 and an impeller 1 connected to a patient interface 5 via an airdelivery conduit 6, as shown in FIG. 1. The controller 4 is typically acomputer, a processor including memory, or a programmable circuit. Oneexample of patient interface is a nasal mask, others include nose andmouth masks, full face masks and nasal pillows. The pressure in the maskmay be measured by a transducer 11 having direct contact with the mask,or alternatively, the transducer may be physically situated in theblower main housing and may estimate the mask pressure usingcorrelations. Flow transducers 10 or other means for measuring flow mayalso be situated in the mask or in the blower main housing. There arevarious displays 8 and switches 7 on the blower housing. There is aninterface 15 to enable the apparatus to communicate with other devices.Some apparatus include a fixed speed blower whose output is controllablyvariably vented to atmosphere providing a controlled variable pressureto the patient.

“Expert” systems are known to be used for assisting with medicaldiagnosis. Such expert systems are typically said to comprise two parts,a “knowledge base” and an “inferencing engine.” The knowledge basecomprises the set of “expert” information about the system which is usedto guide interpretation of the data which has been observed.Sophisticated expert systems may include hundreds, or thousands ofpieces of information in the knowledge base. The fuzzy membership rulesand weights of Berthon-Jones may be interpreted as the knowledge base.The inferencing engine is the mechanism which combines the knowledgebase with the experimental evidence to reach the conclusion. Severaldifferent inferencing engines are known, such as those based on fuzzylogic, rule based reasoning and Bayesian likelihoods.

Bayes' theorem¹ quantifies the intuitively appealing proposition thatprior knowledge should influence interpretation of experimentalobservations. One form of Bayes' theorem is: $\begin{matrix}{\left. {{L\left( H_{i} \right.}F_{j}} \right) = \frac{{L\left( H_{i} \right)}{L\left( {F_{j}\left. H_{i} \right)} \right.}}{\sum\limits_{n}{{L\left( H_{n} \right)}{L\left( {F_{j}\left. H_{n} \right)} \right.}}}} & (1)\end{matrix}$where L is a likelihood or probability function. Thus, L(H|F) is thelikelihood of an hypothesis being true, given observation F, L(H) is thelikelihood of the hypothesis being true, and L(F|H) is the likelihood ofthe observation given the hypothesis being true.

For example, if a physician has observed a particular symptom in apatient, in deciding whether the patient has a particular disease, thephysician draws upon the prior evidence of the likelihood that thepatient has the particular disease. Several independent observations maybe used in conjunction with prior likelihoods to determine thelikelihood that an hypothesis is true. The decision may be taken to bethe most likely hypothesis.

BRIEF DESCRIPTION OF THE INVENTION

The invention is a method and apparatus for determining phase withprobability functions. The method involves partitioning the respiratorycycle into discrete phase states. The states will include inspirationand expiration and preferably include a number of additional stateswithin inspiration and expiration. The probabilities of each phase stateare then calculated using probability functions. In the preferredembodiment, the calculation is a function of an “observed probability”determination L(F_(j)|H_(i)) and a “prior probability” determinationL(H_(i)). The calculated probabilities L(H_(i)|F_(j)) are then comparedto determine the actual phase in the patient's respiratory cycle thatthe patient is experiencing.

Prior probabilities of each particular state may be determined by afunction of relative duration, that is, the ratio of each state'sduration to the duration of an entire respiratory cycle. The inventioncontemplates discrete phase states that may be equivalent in duration orof unequal durations. Such states of different duration may be derivedby partitioning the respiratory cycle into sections in relation to apeak flow or differing rates of change of flow. Moreover, calculatedprobabilities my be adjusted based upon state succession, e.g.,increasing the likelihood of the state that follows consecutively fromthe currently determined state.

The observed probability determination evaluates the likelihood of eachstate given an observed respiratory characteristic. In the preferredembodiment of the invention, respiratory flow is observed or measuredfrom the patient. In the evaluation, the measure is applied to aprobability function that is based upon the predetermined likelihoodsbetween that measure and each potential phase state, for example, thelikelihood that a particular range of flow would be associated with aparticular state.

The method may also be used to dynamically improve reliability of phasedetection by learning the respiratory patterns or characteristics of thepatient. By utilizing previously calculated state probabilities toadjust prior probabilities, subsequently calculated state probabilitiesprovide greater patient specific accuracy in phase determination.Moreover, previously recorded breath data can be used to modify thepartitioning of phase states or revise the relationship between observedrespiratory characteristics and the likelihoods for each state given theobservation.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 depicts a prior art ventilator apparatus suitable for use withthe invention;

FIG. 2 is a flow chart of steps in a method in accordance with theinvention;

FIG. 3 illustrates phase classification based on equivalent stateduration;

FIG. 4 illustrates phase classification based upon peak flow;

FIG. 5 shows phase classification with a set of observations useful fordetermining probabilities of the identified states;

FIG. 6 shows flow versus time data for a person over a period of 1minute;

FIG. 7 shows flow versus time data for a person over a period of 10seconds.

DETAILED DESCRIPTION OF THE INVENTION

The invention provides a method and apparatus for improved ventilatorpatient synchronization in which the most likely phase is determined onthe basis of flow and rate of change of flow information using Bayes'theorem or some similar formula for assessing conditional probability.In an identifying step 20 as shown in FIG. 2, according to theinvention, the respiratory cycle is divided or partitioned into a numberof distinct states, for example, early inspiration, mid-inspiration,late inspiration, early expiration, mid-expiration, late expiration,pause, sigh and cough. When the method and apparatus according to theinvention are being used, flow and pressure observations are madecontinuously and at each time point in a measuring step 22. In acalculating step 24, probabilities or likelihoods are determined. Thelikelihood of the phase corresponding to each of the states isdetermined preferably using Bayes' theorem as shown in equation 1,supra. For example, in a system that distinguishes between six states,six calculations for each distinct state using equation 1 would be made.This evaluation may include an assessment of the prior likelihood ofeach of the identified states L(H_(i)). However, these may be determinedbefore use and/or adjusted during use. Likelihoods of the distinctrespiratory states occurring given flow and rate of change of flowobservations L(H_(i)|F_(j)) are also determined. After theseevaluations, in a determining step 26, the patient's phase is determinedto be the phase which corresponds to the most likely state, e.g. thephase calculation with the highest probability or likelihood. Thisinformation may then be used by the apparatus to adjust the flow, volumeor pressure of air being delivered to the patient in order to improveventilator synchronization.

The prior likelihood or prior probability of each state L(H_(i)) dependsupon the definition of the state and its relative duration. Such adetermination may be accomplished by a ratio of the duration of thestate to the duration of a respiratory cycle. Each state may notnecessarily have the same duration. A simple system might divide therespiratory cycle into two states: Inspiration and Expiration.Alternatively, a greater number of states within inspiration orexpiration may be classified by the system. If the respiratory cycle ledto sinusoidal flow vs. time curves, then it may be appropriate to dividethe cycle into equal temporal subsections and assign each subsection asa state in which case, each state may be equally likely a priori. Forexample, if the duration of a hypothetical respiratory cycle was 6seconds and the system distinguishes six states, then each state may beone second in duration, the first second being termed “earlyinspiration”, the next second “mid-inspiration” and so on. In thismodel, the different states may have the same prior likelihoods. Thus,as illustrated in FIG. 3 the likelihood of each state L(H_(i)) is ⅙ asfollows:

-   -   L(H_(early) _(—) _(inspiration))=⅙    -   L(H_(mid) _(—) _(inspiration))=⅙    -   L(H_(late) _(—) _(inspiration))=⅙    -   L(H_(early) _(—) _(expiration))=⅙    -   L(H_(mid) _(—) _(expiration))=⅙    -   L(H_(late) _(—) _(expiration))=⅙

Increasing the number of states increases the potential accuracy of asystem to track changes in respiratory state, however, this comes at anincreasing computational cost. It may be computationally more efficientto have states of different duration. In one model of respiration, thestates may be chosen on the basis of magnitude of flows, for exampleearly flows from 0 up to ⅙th of the peak flow may be termed “earlyinspiration”. In such a system, for example, as shown in FIG. 4, againbased upon a respiration cycle for a typical patient flow L(H_(early)_(—) _(inspiration)) might be {fraction (4/48)} where 4 approximates theduration of the state and 48 approximates the duration of the entirecycle, viewed as the intercept of the peak flow range and the flowcycle. Similarly, a mid inspirational state determined from ⅚ to{fraction (6/6)} of the peak flow might have a likelihood L(H_(mid) _(—)_(inspiration)) equal to {fraction (11/48)}. FIG. 4 also shows a midexpiration state with L(H_(mid) _(—) _(expiration)) equal to {fraction(9/48)}. The remaining states may be determined in similar fashion.

In another model of respiration, the rate of change of flow may bechosen as the basis for dividing the respiratory cycle. Thus, an earlyinspiration state may be characterized by flow where the rate of changeis in a range appropriate to classify the rate of change of respirationin its early stages. Using for example a graph, the duration of adiscrete portion of the respiratory cycle in that particular rate ofchange range divided by the duration of the entire cycle can then yieldthe prior probability of the particular state L(H_(i)). An advantage ofdividing the respiratory cycle on the basis of rate of change of flow isthat those parts of the respiratory cycle where flow changes morerapidly may have more respiratory states assigned to them. In theselatter two models, the different states may have different priorlikelihoods.

In one form of the invention, the number of states and their definitionsmay be adaptively refined depending upon the breath data. For example,where the flow rate is changing rapidly, the apparatus according to theinvention can determine that it is appropriate to have more states todefine that region.

Observation of breath data of patients over several nights leads to theconclusion that a cough is a priori less likely to occur than a breath,since patients breath more often than they cough. It may also beobserved that a deep breath is more likely following a number of shallowbreaths. Patients are known to pass through a number of different stagesduring sleep, such as REM sleep. The nature of their breathing canchange depending on the different stage of sleep and hence differenttypes of breath are a priori more likely depending on the stage ofsleep. To the extent to which a particular patient exhibitscharacteristic breaths, the system has the capability to learn thesecharacteristics and adjust the prior likelihoods of different states tosuit the patient as herein described.

A discrete set of j observations for purposes of determining an observedprobability function L(F_(j)|H_(i)) may be defined for a flow signal.Similarly, a discrete set of observations of the derivative of flow maybe defined. The function may be predefined or changed as a result ofchanging patient respiratory characteristics. The function may bedefined by dividing the range of values for flow or derivative of flowinto discrete sub-ranges and then comparing those sub-ranges to eachstate and assessing probability based upon a typical or previouslyobserved respiratory flow curve's relationship with that sub-range. Forexample, the flow signal may range from −200 l/min to +200 l/min. Thismay be divided into the following sub-ranges: −200 to −50, −50 to 0, 0to 50, 50 to 200 l/min. Noise in the flow signal defines the smallestdivision into which flow signals may be divided (i.e., there is no pointin dividing the total range of flow signals into 1 l/min divisions ifthe noise level is 2 l/min). The following table, labeled ObservationTable 1, gives an example of the likelihoods of the observations beingmade, given the various hypotheses being true for a system thatdistinguishes six states. In this example, there is a low likelihoodthat a large positive flow signal will be observed during the midexpiration phase.

OBSERVATION TABLE 1 Early Mid Late Early Mid Late L(F|H) InspirationInspiration Inspiration Expiration Expiration Expiration 200 to 100 lowhigh low low low low (Large positive) 50 to 100 medium medium medium lowlow low (Medium positive) 0 to 50 high low high medium low medium (Smallpositive) −50 to 0 medium low medium high low high (Small negative) −100to −50 low low low medium medium medium (Medium negative −200 to low lowlow low high low −100 (Large negative)

While Observation Table 1 includes the terms “low”, “medium” and “high”to describe the likelihoods or probabilities, in actual calculationsthese terms will be quantified in the ranges of 0-33 percent for low,33-66 percent for medium and 66-100 percent for high. Moreover, theseprobabilities need not be limited to three levels. Generally, a changein the boundaries of the states leads to a change in the likelihood ofeach observation given the hypothesis that the patient is in a givenrespiratory state is true. Alternatively, the probabilities may bedetermined from defined continuous likelihood density functions.

FIG. 5 shows sample breath data that is subdivided into 9 states (shownwith Roman numerals). Note that states “i”, “ii” and “v” are relativelybrief compared to states “iii” and “vi”. Hence, everything else beingequal, states “iii” and “vi” have relatively greater prior likelihoodsthan states “i”, “ii” and “v”. The figure also depicts a set of flowobservations (large positive to large negative) as the observationsrelate to the classification of phase states. The observed probabilitiesL(F_(j)|H_(i)) may be determined from this graph. For example, theintercept or observation of a flow in the range of 80-100 (largepositive) would suggest a high probability for state iii but low forstates i, v, vi, vii, viii, ix. States ii and iv may have low to mediumlikelihoods as these cases are at the boundary of the large positiveobservation.

In the following hypothetical example, a calculation of the phaseprobability or likelihood is demonstrated in accordance with theinvention utilizing the simplified six classification system of FIG. 3in determining L(Hi) and Observation Table 1 for determining L(Fj|Hi).The results are as follows:

Observed Fact F:

-   -   Measured flow from flow signal is 150    -   So F_(j)=F_(large) _(—) _(positive)

Likelihood of Hypotheses L(H_(i)):

-   -   L(H_(early) _(—) _(inspiration))=⅙=0.167    -   L(H_(mid) _(—) _(inspiration))=⅙=0.167    -   L(H_(late) _(—) _(inspiration))=⅙=0.167    -   L(H_(early) _(—) _(expiration))=⅙=0.167    -   L(H_(mid) _(—) _(expiration))=⅙=0.167    -   L(H_(late) _(—) _(expiration))=⅙=0.167

Likelihood of Observation Given Hypothesis L(H_(l)|F_(j))

-   -   L(F_(large) _(—) _(positive)|H_(early) _(—) _(inspiration))=0.25        (assuming 0.25=low)    -   L(F_(large) _(—) _(positive)|H_(mid) _(—) _(inspiration))=0.75        assuming 0.75=high)    -   L(F_(large) _(—) _(positive)|H_(late) _(—) _(inspiration))=0.25    -   L(F_(large) _(—) _(positive)|H_(early) _(—) _(expiration))=0.25    -   L(F_(large) _(—) _(positive)|H_(mid) _(—) _(expiration))=0.25    -   L(F_(large) _(—) _(positive)|H_(late) _(—) _(expiration))=0.25

Bayes' Theorem Calculations:$\left. {{\left. {{\left. {\left. {{\left. {{\left. {{L\left( H_{early\_ inspiration} \right.}F_{large\_ positive}} \right) = {\frac{0.25 \times 0.167}{{0.25 \times 0.167} + {5 \times \left( {0.167 \times 0.25} \right)}} = 0.125}}{{L\left( H_{mid\_ inspiration} \right.}F_{large\_ positive}}} \right) = {\frac{0.75 \times 0.167}{{0.25 \times 0.167} + {5 \times \left( {0.167 \times 0.25} \right)}} = 0.375}}{{L\left( H_{late\_ inspiration} \right.}F_{large\_ positive}}} \right) = {\frac{0.25 \times 0.167}{{0.25 \times 0.167} + {5 \times \left( {0.167 \times 0.25} \right)}} = {0.125{L\left( H_{early\_ expiration} \right.}F_{large\_ positive}}}} \right) = {\frac{0.25 \times 0.167}{{0.25 \times 0.167} + {5 \times \left( {0.167 \times 0.25} \right)}} = 0.125}}{{L\left( H_{mid\_ expiration} \right.}F_{large\_ positive}}} \right) = {\frac{0.25 \times 0.167}{{0.25 \times 0.167} + {5 \times \left( {0.167 \times 0.25} \right)}} = 0.125}}{{L\left( H_{late\_ expiration} \right.}F_{large\_ positive}}} \right) = {\frac{0.25 \times 0.167}{{0.25 \times 0.167} + {5 \times \left( {0.167 \times 0.25} \right)}} = 0.125}$By comparing the calculated probabilities L(H_(i)|F_(j)) to find themost probable phase, it is apparent that in this simplified example thephase is early inspiration. With this determination, a system providingventilatory support may automatically adjust the support to accommodatethe patient's phase, for example, by adjusting a pressure gainassociated with the particular state of the determined phase. Moreover,the probability for the phase L(H_(i)) may be modified aftercalculations to improve subsequent determinations by adjusting L(H_(i))to equal or approach the determined phase likelihoods L(H_(i)|F_(j)) bya function of L(H_(i)|F_(j)). Moreover, the likelihoods of each of theobservations L(F_(j)|H_(i)) may be updated based upon recorded breathdata representing a prior respiratory cycle or some average of the priorrespiratory cycles.

In accordance with the invention, a processor of a ventilator apparatuslike that illustrated in FIG. 1 is programmed with an algorithm thataccomplishes the following preferred method:

I. Repeat the following with a first time constant:

(a) Update the prior likelihood for each state L(H_(i))

(b) Update the likelihood of each observation, given each stateL(F_(j)|H_(i))

II. Repeat the following with a second time constant:

(a) Measure flow, determine rate of change of flow

(b) Calculate the likelihood L(H_(i)|F_(j)) for each state using Bayes'theorem.

(c) Phase is determined to be the most likely state.

The first time constant may be in the order of several typical breaths,for example 10 to 15s. The second time constant is shorter, for example,{fraction (1/20)}th of the duration of a typical breath, or severalhundred milliseconds.

In one form, the apparatus according to the invention provides atraining period when the patient is allowed to wear the mask in arelaxed environment. The flow and pressure in the mask are monitored andthe device has the opportunity to learn some of the characteristics ofthe patient's respiratory patterns. During this period adjustments tothe functions for likelihoods P(H_(i)) and P(F_(j)|H_(i)) for each stateof the system can be made using L(H_(i)|F_(j)) and observed breath dataand/or the partitioning of phase states may change. The respiratorycharacteristics of the patient will change when the patient fallsasleep, however, the apparatus can monitor the transition to the sleepstate and estimate probable parameters for the sleep state.

While patient respiratory flow can be modeled as being generallysinusoidal, in reality, the data are more complicated. For example,FIGS. 6 and 7 show flow data from a person over periods of 1 minute and10 seconds respectively. The data can be additionally complicated withthe presence of noise, artefact, drift, sighs, coughs and other events.During the presence of flows of small absolute value, the effect ofheart beat (the so-called “cardiogenic effect”) on flow data can beidentified. These complications, which may be termed “non-idealities”,mean that a simple automatic system may incorrectly decide phase.

For example, with reference to FIG. 7, a system based purely onthreshold values might conclude that the patient had moved to theinspiratory phase at approximately 2 seconds, and then a short whilelater, for example a hundred milliseconds, gone to the expiratory phase,and then switched back to the inspiratory phase once again. In asimplified automatic system, such a breath may complicate calculationsof the length of a respiratory cycle and the volume of air inhaled orexhaled. Hence there is a need for a method and apparatus which canaccurately determine the phase of a respiratory cycle of a patient fromcomplex flow data. There is a need for a method and apparatus which isless likely to be confused by non-ideal flow when determining the phaseof the patient.

One approach to solving the problem of dealing with non-idealities inflow data is to smooth the data, for example by low-pass filtering thedata in the measuring step 22. A low pass filter may be characterized bythe time constant of the filter. A small time constant may mean that theamount of smoothing is small, but the system can respond more quickly. Alarger time constant may mean that the data is smoother, but that thesystem does not respond as quickly. A very large timeconstant—essentially a long term average—may remove all phaseinformation. Hence there is a need to choose an appropriate timeconstant if the data are to be smoothed. Furthermore, there may be anadvantage in a system that learns from the flow data of the patient whatan appropriate time constant may be. Such a system can dynamicallyupdate the time constant if necessary.

Determining the derivative of noisy data can be particularlyproblematic. An algorithm for calculating a derivative may give verydifferent results depending on the period over which the data isanalyzed. For example with reference to FIG. 7, an algorithm whichcalculated the derivative of data over the region from 2 seconds to 2.1seconds may give a negative value, while an algorithm which calculatedthe derivative over the region from 2 seconds to 2.5 seconds may give anear zero value. A turning point is a part of a curve where the slope ofthe curve changes between positive and negative, that is, the secondderivative is zero. Similarly, the data at the end of a respiratorycycle (that is, after exhalation and before inhalation) can beparticularly non-ideal because of the presence of cardiogenic flow. As aresult, the calculations for determining the derivative of flow at theend of a respiratory cycle can be problematic and error prone.

To overcome this problem, an algorithm for determining phase inaccordance with the invention may first determine whether the patient islikely to be near the end of a respiratory cycle (for example, if theabsolute value of a flow datum is small, hence distinguishing from peakinspiration and peak exhalation). If the patient is likely to be nearthe end of a respiratory cycle, then a different time constant may beapplied to the smoothing of data for the purposes of calculating aderivative. In a preferred embodiment, the time constant will be longerin the region near the end of the respiratory flow curve than at otherregions, such as early to late inspiration and early to late expiration.Furthermore, in an algorithm in accordance with the invention, theeffect of the derivative in determining the phase of the patient'srespiratory cycle is given less weight in the region where derivativecalculations are likely to be error prone, such as one or more of thefollowing: the end of the respiratory cycle, peak inspiration, and peakexpiration. Furthermore, in an algorithm in accordance with anembodiment of the invention, an a priori likelihood function for thederivative of flow in the end of the respiratory cycle has a maximum ata low or zero value of flow and a minimum at large values of thederivative. In other words, in an algorithm in accordance with anembodiment of the invention, in this region, a low value of thederivative has a higher likelihood than a high value of the derivative.

In a preferred embodiment of the invention, 12 bit flow data arecollected at 50 Hz. The data are low pass filtered with a time constantof 160 ms.

As previously described, in a system in which phase is divided intoseveral states, an algorithm in accordance with an embodiment of theinvention may determine that the patient is in one of those states, forexample the state with the largest likelihood or probability.Alternatively the algorithm may determine that phase is part way betweentwo adjacent states with high likelihoods. The algorithm may determinethat the phase is closer to the one of the two states with the highestlikelihood, for example, by weighting in accordance with the relativesize of the likelihoods. Hence if one state is 95% likely and another is70% likely, the phase will be determined to be closer to the state whichis 95% likely. In this regard, phase may be determined as a continuousvariable. For example, phase may vary from 0 to 1 depending on the statedetermined or depending on the proximity between two most likely states.Alternatively or additionally, phase may be represented using polarcoordinates and vary from 0 to 360 degrees, or 0 to 2 pi radians.

To illustrate such a determination, phase may be calculated as acontinuous variable φ. One way to estimate this from a series ofposterior probabilities P_(i) of N states S_(i) is to associate eachstate with a standard phase φ_(s,i) and weighting factor W_(i) thencalculate φ as$\phi = {\sum\limits_{i = 1}^{N}\quad{P_{i}W_{i}\phi_{s,i}}}$Another approach is to use the formulation of Bayes theorem in terms ofcontinuous random variables, which yields the following posteriordensity function (assuming here that the information available about thepatient is the instantaneous respiratory flow q),p_(101 |Q)(φ,q)and the estimate of φ is that value which maximizes the posteriordensity given the observed value q of patient flow (this may be a localor global maximum). In practice, the prior and conditional densitieswhich are used to calculate the posterior density may be estimated fromdiscrete data, possibly by using continuous interpolating functions suchas piecewise linear or cubic spline functions. The posterior densityfunction may then be calculated (possibly piecewise) analytically or vianumerical methods, yielding a posterior density function which may thusbe a continuous function of φ and q. If the posterior density is acontinuous function, it follows that since flow q is a continuousfunction of time then the estimated phase φ is a continuous function oftime.

Such a continuous phase variable may then be used to adjust ventilatorsupport pressure. For example, if the pressure delivered to the patientis based on a continuous function Π of phase,

 P=P _(min) +AΠ(φ)

where P_(min) and A are constants or slowly varying quantities, then animportant consequence of the phase being a continuous function of timeis that the pressure is a continuous function of time, which may bedesirable for example in order to avoid the discomfort which may beassociated with sudden changes in pressure delivered to the airway.

Of course, as the number of discrete states increases, therepresentation of phase may be regarded as a continuous, rather thandiscrete function. This may alleviate a need for the additionalcalculation of a continuous phase variable from the determined phasestates. In this regard, although six and nine states have beenidentified in prior embodiments, by way of example, phase may be dividedinto as many as 128 or 256 states.

In an algorithm in accordance with an embodiment of the invention, phasedeterminations may be enhanced by other phase related likelihoods. Forexample, consecutive phase states are more likely than non-consecutivephases. Thus, a phase determination may be based in part upon thelikelihood that the current state is the next consecutive state from apreviously determined state. To illustrate such a process, suppose thatit has been determined that the current phase state is earlyinspiration. If the next phase state is mid-inspiration, thenmid-inspiration is a priori more likely than a non-consecutive state,such as late inspiration or an expiratory state. Hence as phaseprogresses through the cycle, a priori likelihoods are adjusted inaccordance with their consecutive status, for example by increasing thecalculated probability of the next consecutive state. This is not to saythat an algorithm in accordance with an embodiment of the inventioncannot make a determination that a non-consecutive state will follow thecurrent state, but simply that it is less likely to make such adetermination. Hence in an algorithm in accordance with an embodiment ofthe invention, phase “cycling”—where the algorithm flips back andforward between two states—is less likely.

Although the invention has been described with reference to particularembodiments, it is to be understood that these embodiments are merelyillustrative of the application of the principles of the invention.Thus, it is to be understood that numerous modifications may be made inthe illustrative embodiments of the invention and other arrangements maybe devised without departing from the spirit and scope of the invention.

1. A method for determining a subject's respiratory phase duringventilatory support comprising the steps of: identifying a plurality ofphase states from a respiration cycle; measuring airflow from a subjectduring the subject's respiratory cycle; calculating phase-stateprobabilities for said phase states with a measure of said airflow; anddetermining a phase in the subject's respiratory cycle from thecalculated phase-state probabilities of said phase states.
 2. The methodof claim 1 wherein said calculating step includes the sub-steps of:calculating prior probabilities for said phase states; and calculatingobserved probabilities for said phase states given said measure ofairflow.
 3. The method of claim 2 wherein said prior probabilities arefunctions of a phase state duration relative to respiratory cycleduration.
 4. The method of claim 3 wherein said prior probabilities area further function of previously calculated phase-state probabilities.5. The method of claim 3 wherein said observed probabilities are definedby a comparing function that relates said phase states to sub-rangesselected from a range of measures of an airflow cycle.
 6. The method ofclaim 5 wherein said comparing function changes as a result of changingairflow cycles of the subject.
 7. The method of claim 3 wherein saiddetermining a phase step involves comparing said calculated phase-stateprobabilities to identify a calculated phase-state probability that ismore probable than other calculated phase-state probabilities.
 8. Themethod of claim 3 wherein said identifying step involves partitioning arespiration cycle in relation to a peak flow.
 9. The method of claim 3wherein said identifying step is repeated to adjust said phase states toaccount for the subject's changing respiratory characteristics asassessed by a measure of said airflow over time.
 10. The method of claim3 wherein said step of calculating phase-state probabilities involves anevaluation of the prior probabilities and the observed probabilities asa function of Bayes' theorem.
 11. The method of claim 3 furthercomprising the step of adjusting ventilatory support based upon resultsfrom said determining a phase step.
 12. The method of claim 3 whereinsaid step of calculating phase-state probabilities includes adjusting aphase-state probability based upon state succession.
 13. The method ofclaim 3 wherein said step of determining a phase involves the sub-stepof calculating a continuous phase variable from said phase-stateprobabilities.
 14. The method of claim 1 wherein said step of measuringairflow includes the sub-step of smoothing said airflow by performing alow pass filtering operation on said airflow.
 15. An apparatus fordetermining a subject's respiratory phase during ventilatory supportcomprising: a ventilator to provide a controlled supply of breathablegas to a subject's airway; a pressure transducer for generating an airflow signal representative of respiratory air flow from the subject; anda processor with programmed instructions for controlling the steps of:identifying a plurality of phase states of a respiration cycle;determining a measure of air flow from said air flow signal; calculatingphase-state probabilities for said phase states with the measure of airflow; and determining a phase in the subject's respiratory cycle fromthe calculated phase-state probabilities of said phase states.
 16. Theapparatus of claim 15 wherein said calculating step includes thesub-steps of: calculating prior probabilities for said phase states; andcalculating observed probabilities for said phase states given saidmeasure of airflow.
 17. The apparatus of claim 16 wherein said priorprobabilities are functions of a phase state duration relative torespiratory cycle duration.
 18. The apparatus of claim 17 wherein saidprior probabilities are a further function of previously calculatedphase-state probabilities.
 19. The apparatus of claim 17 wherein saidobserved probabilities are defined by a comparing function that relatessaid phase states to sub-ranges selected from a range of measures of anairflow cycle.
 20. The apparatus of claim 19 wherein said comparingfunction changes as a result of changing airflow cycles of the subject.21. The apparatus of claim 17 wherein said determining a phase stepinvolves comparing said calculated phase-state probabilities to identifya calculated phase-state probability that is more probable than othercalculated phase-state probabilities.
 22. The apparatus of claim 17wherein said identifying step involves partitioning a respiration cyclein relation to a peak flow.
 23. The apparatus of claim 17 wherein saididentifying step is repeated to adjust said phase states to account forthe subject's changing respiratory characteristics as assessed by ameasure of said airflow over time.
 24. The apparatus of claim 17 whereinsaid step of calculating phase-state probabilities involves anevaluation of the prior probabilities and the observed probabilities asa function of Bayes' theorem.
 25. The apparatus of claim 17 furthercomprising instructions for controlling an adjustment to ventilatorysupport based upon results from said determining a phase step.
 26. Themethod of claim 17 wherein said step of calculating phase-stateprobabilities includes adjusting a phase-state probability based uponstate succession.
 27. The method of claim 17 wherein said step ofdetermining a phase involves the sub-step of calculating a continuousphase variable from said phase-state probabilities.
 28. The method ofclaim 15 wherein said step of determining a measure of airflow includesthe sub-step of smoothing data from said airflow by performing a lowpass filtering operation on said data from said airflow.
 29. Anapparatus for determining a subject's respiratory phase duringventilatory support comprising: a means for providing a controlledsupply of breathable gas to a subject's airway; a means for generatingan air flow signal representative of respiratory air flow from thepatient; and a control means with programmed instructions forcontrolling the steps of: identifying a plurality of phase states of arespiration cycle; determining a measure of air flow from said air flowsignal; calculating phase-state probabilities for said phase states withthe measure of air flow; and determining a phase in the subject'srespiratory cycle from the calculated phase-state probabilities of saidphase states.
 30. The apparatus of claim 29 wherein said calculatingstep includes the sub-steps of: calculating prior probabilities for saidphase states; and calculating observed probabilities for said phasestates given said measure of airflow.
 31. The apparatus of claim 30wherein said prior probabilities are functions of a phase state durationrelative to respiratory cycle duration.
 32. The apparatus of claim 31wherein said prior probabilities are a further function of previouslycalculated phase-state probabilities.
 33. The apparatus of claim 31wherein said observed probabilities are defined by a comparing functionthat relates said phase states to sub-ranges selected from a range ofmeasures of an airflow cycle.
 34. The apparatus of claim 33 wherein saidcomparing function changes as a result of changing airflow cycles of thesubject.
 35. The apparatus of claim 31 wherein said determining a phasestep involves comparing said calculated phase-state probabilities toidentify a calculated phase-state probability that is more probable thanother calculated phase-state probabilities.
 36. The apparatus of claim31 wherein said identifying step involves partitioning a respirationcycle in relation to a peak flow.
 37. The apparatus of claim 31 whereinsaid identifying step is repeated to adjust said phase states to accountfor the subject's changing respiratory characteristics as assessed by ameasure of said airflow over time.
 38. The apparatus of claim 31 whereinsaid step of calculating phase-state probabilities involves anevaluation of the prior probabilities and the observed probabilities asa function of Bayes' theorem.
 39. The apparatus of claim 31 furthercomprising instructions for controlling an adjustment to ventilatorysupport based upon results from said determining a phase step.
 40. Themethod of claim 31 wherein said step of calculating phase-stateprobabilities includes adjusting a phase-state probability based uponstate succession.
 41. The method of claim 31 wherein said step ofdetermining a phase involves the sub-step of calculating a continuousphase variable from said phase-state probabilities.
 42. The method ofclaim 29 wherein said step of determining a measure of airflow includesthe sub-step of smoothing data from said airflow by performing a lowpass filtering operation on said data from said airflow.